package com.example.kotlinlearndemo.kotlin.funcations

class FFoo {

    interface Foo {
        fun i(input: String): Int
    }

    interface Boo{
        fun boo():Int
    }

    class BooChild:Boo{
        override fun boo(): Int {
            return 1
        }

    }

    fun foo() {
        val boo=BooChild()
        stringMapper("Android") { boo.boo() }

        val foo:Foo=object : Foo{
            override fun i(input: String): Int {
                return 1
            }
        }
        //stringMapper("",mapper=foo.i())
    }

    fun stringMapper(str: String="", mapper: () -> Int): Int {
        // Invoke function
        return mapper()
    }

}